x86, hvm: Move return-to-guest timer and interrupt cranking logic
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 23 Oct 2008 10:40:59 +0000 (11:40 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 23 Oct 2008 10:40:59 +0000 (11:40 +0100)
commit33d21c38e4aa82c075c75e70bca94040d096fb9e
treea90dc45d70ead3b2807f8eed0ac1d88703c58a96
parent869da4e975c494e77d9256461873abf5fc935983
x86, hvm: Move return-to-guest timer and interrupt cranking logic
outside of IRQ-safe context. This allows us to safely take
non-IRQ-safe spinlocks.

The drawback is that {vmx,svm}_intr_assist() now races new event
notifications delivered by IRQ or IPI. We close down this race by
having vcpu_kick() send a dummy softirq -- this gets picked up in
IRQ-sage context and will cause retry of *_intr_assist(). We avoid
delivering the softirq where possible by avoiding it when we are
running in the non-IRQ context of the VCPU to be kicked.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/domain.c
xen/arch/x86/hvm/svm/entry.S
xen/arch/x86/hvm/vmx/entry.S
xen/include/asm-x86/event.h
xen/include/asm-x86/softirq.h